if exists('g:loaded_find_api_autoload')
    finish
endif

let g:loaded_find_api_autoload = 1

let s:inited_funs = 0
let s:funs = {}
let s:apis_funs_file = expand('<sfile>:p:h:h') . '/apis/funs.txt'

function! find_api#get_funs()
    if s:inited_funs == 0
        let s:inited_funs = 1
        for line in readfile(s:apis_funs_file)
            let [fun_name, dlls] = split(line, '|')
            let s:funs[fun_name] = {}
            for dll_info in split(dlls, ';')
                let [dll_name, sys] = split(dll_info, ':')
                let s:funs[fun_name][dll_name] = split(sys, ',')
            endfor
        endfor
    endif
    return s:funs
endfunction
